package com.fatesgo.util;


import com.fatesgo.pojo.Response;

public class ResponseResult {

    public static Response success(String msg, Object data) {
        Response res = new Response();
        res.success(msg, data);
        return res;
    }

    public static Object success(String msg) {
        return success(msg, null);
    }

    public static Response error(String msg, Object data,int code) {
        Response res = new Response();
        res.error(msg, data,code);
        return res;
    }

    public static Response error(String msg, Object data) {
        Response res = new Response();
        res.error(msg, data);
        return res;
    }

    public static Object error(String msg) {
        return error(msg, null);
    }

}
